import Taro, {Component} from '@tarojs/taro'
import {View, Text} from '@tarojs/components'
import {AtAvatar} from 'taro-ui'
import './index.scss'

export default class PersonCard extends Component {
  constructor(props){
    super(props)
  }

  render() {
    const {item} = this.props
    if (item) {
      return (
        <View className='person-content'>
            <View className='person-name'>
              <Text>{item.name}</Text>
            </View>
            <View className='person-topic-name'>
              <Text>{item.topicName}</Text>
            </View>
            <View className='person-avatar'>
              <View className="avatar-box">
                <AtAvatar image={item.avatar} size="small" circle></AtAvatar>
              </View>
            </View>
        </View>
      )
    }
    return null
  }
}
